﻿@{
    var cloudAccount = CloudStorageLight.Core.BlobService.GetCurrentCloudAccount();
    bool disableUserAdmin = cloudAccount != null && cloudAccount.IsFtpAuthentication();
}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - Could Storage Light</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="~/Content/themes/base/core.css" />
    <link rel="stylesheet" href="~/Content/themes/base/base.css" />
    <link rel="stylesheet" href="~/Content/themes/base/dialog.css" />
    <link rel="stylesheet" href="~/Content/themes/base/theme.css" />
    <link rel="stylesheet" href="~/Content/bootstrap.min.css">
    <link rel="stylesheet" href="~/Content/metro-bootstrap.min.css">
    <link rel="stylesheet" href="~/Content/metro-bootstrap-responsive.min.css">
    <link rel="stylesheet" href="~/Content/iconFont.min.css">
    <link rel="stylesheet" href="~/Content/cloudstoragelight.css?v=20160317B">
    <link rel="shortcut icon" type="image/icon" href="@(Url.Content("~/favicon.ico"))" />

    <script type="text/javascript" src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.tmpl.js"></script>
    <script type="text/javascript" src="~/Scripts/linq.js"></script>
    <script type="text/javascript" src="~/Scripts/linq.jquery.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="~/Scripts/metro.min.js"></script>
    <script type="text/javascript" src="~/Scripts/datajs-1.1.3.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.fileupload.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.fileDownload.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.bottom-1.0.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery-ui.min-1.11.1.js"></script>
    <script type="text/javascript" src="~/Scripts/cloudstoragelight.js?v=20160317B"></script>

</head>
<body class="metro">
    <div id="maindiv" class="container body-content">
        <header class="nrm nlm">
            <div class="clearfix bg-darkBlue fg-white" id="header-cont">
                <div class="place-right">

                    @if (Request.IsAuthenticated)
                    {
                    <div class="margin10">
                        <i class="icon-user"></i>
                        @(User.Identity.Name.Split('@')[0])
                        <a id="logoff" href="Logoff"><i class="icon-exit" title="logoff" style="background:white;color:blue;padding:10px;border-radius:50%"></i></a>
                    </div>
                    }


                </div>

                <div class="place-left margin10">
                    <nav class="horizontal-menu">
                        <ul>
                            @Html.Partial("_HomeCommand")

                            @if (!disableUserAdmin && (!ViewData.Keys.Contains("MenuVisibility") || (bool)ViewData["MenuVisibility"]))
                            {
                                <li><a href="Login" class="command-link">@(CloudStorageLight.Core.Web.ViewMessages.MsgLogin)</a></li>
                                if (!string.IsNullOrEmpty(CloudStorageLight.Core.BlobService.GetCurrentDomain()) || !CloudStorageLight.Core.SystemSettings.Instance.MultiDomain)
                                {
                                    if (cloudAccount != null && cloudAccount.CanCreateSelfAccount)
                                    {
                                        <li>@Html.ActionLink(CloudStorageLight.Core.Web.ViewMessages.MsgRegister, "Register", null, new { @class = "command-link" })</li>
                                    }                                    
                                    <li>@Html.ActionLink(CloudStorageLight.Core.Web.ViewMessages.MsgForgotPassword, "ForgotPassword", null, new { @class = "command-link" })</li>
                                }
                                else
                                {
                                    if (CloudStorageLight.Core.SystemSettings.Instance.CanCreateCloudAccountOnline)
                                    {
                                        <li><a href="@Url.RouteUrl("createCloudAccount")" class="command-link">@CloudStorageLight.Core.Web.ViewMessages.MsgCreateCloudStorageLight</a></li>
                                    }
                                }

                                if (Request.IsAuthenticated)
                                {
                                    <li>@Html.ActionLink(CloudStorageLight.Core.Web.ViewMessages.MsgChangePassword, "Manage", null, new { @class = "command-link" })</li>
                                }
                            }

                        </ul>
                    </nav>

                </div>

                <div class="place-right">
                </div>
            </div>
        </header>
        <div class="container body-content">
            @RenderBody()
            <hr />
            <footer>
            </footer>
        </div>

        @RenderSection("scripts", required: false)
    </div>
</body>
</html>
